@extends('admin::layouts.master')
@section('content')
    <div class="card" id="app">
        <div class="card-header">模板管理</div>
        <div class="tab-container">
            <ul role="tablist" class="nav nav-tabs">
                <li class="nav-item"><a href="/admin/template" class="nav-link active">模板列表</a></li>
            </ul>
            <div class="card card-contrast card-border-color-success">
                <div class="card-body">
                    <div class="row">
                        @foreach($tps as $tp)
                        <div class="col-sm-3 text-center">
                            <div style="width:100%;position:relative;">
                            <img src="{{$tp['preview']}}" style="width:100%;" alt="">
                            @if(\HDModule::config('admin.config.template')==$tp['name'])
                            <a href="javascript:;" style="display:block;color:white;width:100%;height:30px;background:rgba(0,255,0,0.4);position:absolute;bottom:0px;line-height: 30px;">当前默认</a>
                                @else
                                    <a href="/admin/setDefaultTp/{{$tp['name']}}" style="display:block;color:white;width:100%;height:30px;background:rgba(0,0,0,0.4);position:absolute;bottom:0px;line-height: 30px;">设为默认</a>
                                @endif
                            </div>
                        </div>
                        @endforeach
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="float-right">

    </div>
@endsection
